﻿// Write a program that reads the radius r of a circle and prints its perimeter and area.

using System;

class PrintPerimeterAreaCircle
{
    static void Main()
    {
        Console.Write("Enter radius for your circle: ");
        string str = Console.ReadLine();
        double radius;

        if (double.TryParse(str, out radius))
        {
            if (radius <= 0)
            {
                Console.WriteLine("The raduis must have value greater than 0");
            }
            else
            {
                double perimeter = 2 * radius * Math.PI;
                Console.WriteLine("The perimeter of the circle is : {0:0.00}", perimeter);
                double area = radius * radius * Math.PI;
                Console.WriteLine("The area of the circle is : {0:0.00}", area);
            }
        }
        else
        {
            Console.WriteLine("Your entered radius is invalid!");
        }
    }
}
